Get extrema
Finds extreme pixel values in the image.
🖼️ Image options and parameters of getExtrema
function
getExtrema
, as the name suggests, finds extreme intensity values of the image. If user looks for minimum values it finds the darkest points, when maximum - the brightest.
The principle is straight-forward: the function iterates through each point and compares values around it. If all the values around point in question is smaller then the point is considered a minimum. Same algorithm for maximum values.
info
By choosing different algorithm option you can change the size of the neighboring area where the extrema is search.
tip
You can add a mask as an option to specify locations where to look for extrema.
Minimum | Maximum |
---|---|
Kinds of images compatible with algorithm
Image property | What it means | Possible values |
---|---|---|
bitDepth | number of bits per channel | [8,16] |
components | number of components | any |
alpha | is alpha channel allowed | true |
Parameters and default values
-
image
-
options
Options
Property | Required | Default value |
---|---|---|
kind | no | 'maximum' |
mask | no | - |
algorithm | no | star |
maxEquals | no | 2 |